package com.ttxz.sample.db.dao

import androidx.room.*
import com.ttxz.sample.bean.ArticleListItemBean
import com.ttxz.sample.bean.BannerBean
import com.ttxz.sample.db.entity.ArticleListEntity
import com.ttxz.sample.db.entity.BannerEntity

@Dao
interface ArticleDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insert(articleList:ArticleListEntity)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    suspend fun insertList(articleListEntityList:List<ArticleListEntity>)

    @Query("SELECT * FROM T_ARTICLE_LIST")
    suspend fun queryAll():List<ArticleListEntity>

    @Delete
    suspend fun delete(vararg articleListEntity: ArticleListEntity):Int

    @Query("DELETE FROM T_ARTICLE_LIST")
    suspend fun deleteAll():Int


}